package com.blacktry.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.blacktry.entity.model.Admin;
import com.blacktry.entity.model.CourseDistribution;
import com.baomidou.mybatisplus.extension.service.IService;
import com.blacktry.entity.model.Vo.ClassCourseVo;
import com.blacktry.entity.model.Vo.Research;
import com.blacktry.entity.model.vueVO.CourseInfo;
import com.blacktry.entity.model.vueVO.CourseRealInfo;
import com.blacktry.entity.model.vueVO.TextValue;
import com.blacktry.entity.model.vueVO.Info;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author blackTry
 * @since 2021-12-05
 */
public interface CourseDistributionService extends IService<CourseDistribution> {

    CourseDistribution selectOne(Integer id);

    Integer updateOrInsert(CourseDistribution courseDistribution);

    Integer merge(String[] ids);

    Integer split(String[] ids);

    Integer distributionTeacher(Integer id, String username);

    Integer distributionRoom(Integer id, Integer roomId);

    Page<CourseDistribution> selectPageByCD(CourseDistribution courseDistribution, Page<CourseDistribution> page);

  //看某一个教研室内教师工作安排情况
    Page<Research> researchWorkGoing(Admin admin, Page<Research> researchPage);

    // 所有分合班级要修的课
    List<ClassCourseVo> selectClassId2Course();

    String[] selectCourseName(String userId);


    String[] selectClassName(String userId,String courseName);

    //根据课程名查看所有班级
    String selectClassNameByCourseName(String courseName);

    //学生查询自己要上的课程
    ArrayList<TextValue> studentSelectCourseName(String userName);

    // 根据课程id查询可以教这门课的老师及其归属
    List<Info> selectTeacherNameAndAffiliation(String courseId);

    // 根据姓名查询该教师已分配的课程信息
    List<CourseRealInfo> selectTeacherWork(String userId);


}
